import {
    createStore,       //创建store
    applyMiddleware,   //中间件
    combineReducers    //合并reducer
} from 'redux';

import {composeWithDevTools} from 'redux-devtools-extension'

import countReducer from './reducers/countReducer' //引入reducer
import movieReducer from './reducers/movieReducer' //引入reducer

import thunk  from 'redux-thunk'; //中间件解决异步action



const allReducer = combineReducers({
    count: countReducer,
    movie: movieReducer
})

const store = createStore(allReducer , composeWithDevTools(applyMiddleware(thunk)))

export default store

